package com.lslx.ln.sample.annotation.customer;

import com.lslx.ln.sample.DemoService;
import com.lslx.ln.sample.annotation.customer.comp.DemoServiceComponent;
import com.lslx.ln.sample.annotation.customer.config.CustomerConfiguration;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.io.IOException;

/**
 * <pre>
 *  Application
 * </pre>
 *
 * @Author zhangj
 * @Date 2022/6/27 11:29
 */
public class Application {

    public static void main(String[] args) throws IOException {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(CustomerConfiguration.class);
        context.start();

        DemoService service = context.getBean("demoServiceComponent", DemoServiceComponent.class);
        String world = service.sayHello("world");
        System.out.println(world);

        System.in.read();
    }



}
